<html>
	<head>
		<title>Welcome !</title>
		<link href="style.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="functions.js"></script>
		<script type="text/javascript" src="jquery-1.6.1.js"></script>
	</head>
	
	<body>
		<div id="content">
			<br />
			<?php require_once 'menu.php';?>
			<br />
			<br />
			<form action="<?php echo $_SERVER['PHP_SELF']?>?action=displayObjectsForm" method="POST">
				<table id="table_form" cellspacing="5" cellpading="5">
				<?php for ($i=1;$i<=$_SESSION["nr_sensors"];$i++) { ?>
					<tr>
						<th>
							Select sensor type :
						</th>
						<td>
							<select name="sensor_type<?php echo "_".$i?>">
							<?php
								global $sensor_types;
								foreach ($sensor_types as $type) {
							?>
								<option value="<?php echo $type;?>"><?php echo $type;?></option>
							<?php } ?>
							</select>
						</td>
					</tr>
					<tr>
						<td>
							Select room in which sensor is located :
						</td>
						<td>
							<select name="sensor_location<?php echo "_".$i?>">
							<?php
								global $room_types;
								foreach ($room_types as $type) {
									for ($j=1;$j<=$_SESSION[$type.'_no'];$j++) {
							?>
								<option value="<?php echo $type."_".$j;?>"><?php echo $type."_".$j;?></option>
							<?php } ?>
							<?php } ?>
							</select>
						</td>
					</tr>					
					<tr>
						<td>&nbsp;</td>
					</tr>
				<?php } ?>
					<tr>
						<td>
							<input type="submit" name="submitSensors" value="submit">
						</td>
					</tr>
				</table>
			</form>
			<div id="sensors_form"></div>
			<br />
		</div>
	</body>
</html>